HBASE-30192 ColumnFamilyDescriptor.getConfigurationValue should also read the values map#8295
Open
junegunn wants to merge 1 commit into
Open
HBASE-30192 ColumnFamilyDescriptor.getConfigurationValue should also read the values map#8295junegunn wants to merge 1 commit into
junegunn wants to merge 1 commit into
Conversation
…read the values map Since shell writes CF CONFIGURATION to values map (HBASE-20819), getConfigurationValue should access it before checking the legacy configuration map. Note: changes behavior of a public method.
There was a problem hiding this comment.
Pull request overview
Fixes HBASE-30192 so that ColumnFamilyDescriptor.getConfigurationValue also consults the values map, since the HBase shell writes CF CONFIGURATION entries there (HBASE-20819). Previously, settings made via the shell were invisible to code paths that read via getConfigurationValue, causing, e.g., the FIFO compaction sanity check to miss shell-configured policies.
Changes:
getConfigurationValuenow returns the value from the values map first, falling back to the legacy configuration map.- Javadoc on the interface updated to describe the new lookup order.
- Added unit tests for the fallback behavior and an end-to-end sanity-check test exercising both
setValueandsetConfigurationpaths for FIFO compaction.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| hbase-client/src/main/java/org/apache/hadoop/hbase/client/ColumnFamilyDescriptor.java | Updated Javadoc to reflect new lookup precedence. |
| hbase-client/src/main/java/org/apache/hadoop/hbase/client/ColumnFamilyDescriptorBuilder.java | Implementation: check values map before configuration map. |
| hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestColumnFamilyDescriptorBuilder.java | Unit tests verifying fallback and precedence. |
| hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestTableDescriptorChecker.java | Sanity-check test covering FIFO policy via both setValue and setConfiguration. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since shell writes CF CONFIGURATION to values map (HBASE-20819),
getConfigurationValueshould access it before checking the legacy configuration map.Note: changes behavior of a public method.